//
//  View1Controller.swift
//  firstProject
//
//  Created by 张彦辉 on 2017/3/8.
//  Copyright © 2017年 张彦辉. All rights reserved.
//

import UIKit
import SnapKit

class View1Controller: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        self.view.backgroundColor = UIColor.white
//        self.navigationItem.title = "first one"
//        self.navigationItem.title = "first one"
//        self.tabBarController?.title = "first one"
        
        
        let button = UIButton()
        button.backgroundColor = UIColor.red
        button.setTitle("跳转", for: .normal)
//        button.addTarget(self, action: #selector(method),f)
        button.addTarget(self, action: #selector(jamp), for: .touchUpInside)
        self.view.addSubview(button)
        button.snp.makeConstraints { (make) in
            make.center.equalTo(self.view)
        }
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
    }
    
    func jamp() -> Void {
        self.navigationController?.pushViewController(TestController(), animated: true)
    }
    

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destinationViewController.
        // Pass the selected object to the new view controller.
    }
    */

}
